#ifndef __COMMON_H__
#define __COMMON_H__

#define LIBUSB_EXIT	1//1: libusb已安装，0: libusb未安装

#define _(String) (String)//gettext(String)

#ifndef true
#define true	TRUE
#endif

#ifndef false
#define false	FALSE
#endif

//#define _DBG_	//开启调试输出，屏蔽则关输出
//#define _ERR_	//开启错误输出，屏蔽则关输出
//#define _LOG_	//开始关键信息输出，屏蔽则关输出

#ifdef _DBG_
#define	DBG(...) printf(__VA_ARGS__)
#else
#define	DBG(...)
#endif

#ifdef _ERR_
#define	ERR(...) printf(__VA_ARGS__)
#else
#define	ERR(...)
#endif

#ifdef _LOG_
#define	LOG(...) printf(__VA_ARGS__)
#else
#define	LOG(...)
#endif


#define D_DBG(...)	\
	DBG("[%s:%d:%s] ", __FILE__, __LINE__, __func__);\
	DBG(__VA_ARGS__)

#define D_ERR(...)	\
	ERR("[%s:%d:%s] ", __FILE__, __LINE__, __func__);\
	ERR(__VA_ARGS__)

#define D_LOG(...)	\
	LOG("[%s:%d:%s] ", __FILE__, __LINE__, __func__);\
	LOG(__VA_ARGS__)

//#define DEFAULT_DBG D_DBG
#define DEFAULT_DBG(...)


#define DRV_OK		(0)
#define DRV_ERR 	(-1)

#define uint8 unsigned char
#define int8 char

#define uint16 unsigned short int
#define int16 short int

#define uint32 unsigned int
#define int32 int

#define uint8_t unsigned char
#define int8_t char

#define uint16_t unsigned short int
#define int16_t short int

#define uint32_t unsigned int
#define int32_t int




#endif

